#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;

class Point{
public:
    Point(int x = 0,int y = 0)
    : _ix(x)
    , _iy(y)
    {
        /* cout << "Point(int,int)" << endl; */
    }

    Point(const Point & rhs)
    : _ix(rhs._ix)
    , _iy(rhs._iy)
    {
        cout << "Point(const Point &)" << endl;
    }

    void print() const{
        cout << "(" << _ix
            << "," << _iy
            << ")" << endl;
    }
private:
    int _ix;
    int _iy;
};

void test0(){
    Point pt;
    Point pt1(1,2);
    Point pt2(3,4);
    Point pt3(10,20);
    vector<Point> nums;
    nums.push_back(pt1);
    nums.push_back(pt2);
    nums.push_back(pt3);
    cout << &pt1 << endl;
    cout << &nums[0] << endl;

    vector<Point> nums2(3);
    nums2[0].print();
    auto it = nums2.begin();
    ++it;
    it->print();
    ++it;
    it->print();

    vector<Point> nums3(5,pt1);
    vector<Point> nums4(5,Point(1,5));
    vector<Point> nums5(5,{3,7});

    vector<Point> nums6{pt,pt1,pt2,pt3};
    vector<Point> nums7{Point(1,7),pt2,{1,7},{9,8}};
    vector<Point> nums8(nums6.begin(),nums6.end());

    for(auto & pt : nums7){
        /* cout << pt << " "; */
        pt.print();
    }

}

int main(void){
    test0();
    return 0;
}
